;; -*- lexical-binding: t; -*-

(defun my/gtd ()
  "This command opens ~/things_to_do.org"
  (interactive)
  (find-file "~/prog/org/gtd.org"))

(defun my/init.el ()
  "init-file opens ~/.emacs"
  (interactive)
  (find-file "~/.config/emacs/init.el"))

(defun my/init-evil ()
  "loads my viper initialization file"
  (interactive)
  (load "~/.config/emacs/lisp/init-evil.el")
  (find-file "~/.config/emacs/lisp/init-evil.el"))

(defun rc.lua ()
  "This command opens ~/.config/awesome/rc.lua"
  (interactive)
  (find-file "~/.config/awesome/rc.lua"))

(defun emacs.texi ()
  "This command opens ~/manuals/cheatsheats/emacs.texi"
  (interactive)
  (find-file "~/manuals/cheatsheats/emacs.texi"))

(defun gawk.texi ()
  "This command opens ~/manuals/cheatsheats/gawk.texi"
  (interactive)
  (find-file "~/manuals/cheatsheats/gawk.texi"))

(defun systemd.texi ()
  "This command opens ~/manuals/systemd.texi"
  (interactive)
  (find-file "~/manuals/systemd.texi"))

(defun test-awesome ()
  "this run /home/joshua/programming/bash/test-awesome.bash"
  (interactive)
  (start-process "testing-awesome" "test-of-awesome" "test-awesome.bash"))

(defun sudo-find-file ()
  "Like find file, but opens the file as root."
  (interactive)
  (interactive "FSudo Find File: ")
  (let ((tramp-file-name (concat "/sudo::" (expand-file-name file-name))))
    (find-file tramp-file-name)))

(defun find-file-sudo (file-name)
  "Like find file, but opens the file as root."
  (interactive)
  (sudo-file-file))

(defun view-hurd-file-in-browser ()
  "View this file in the browser"
  (interactive)
  (let [file (buffer-file-name)]))

(provide 'init-defuns)
